# this is not a proper makefile yet

JAVA = java
CP = -cp
FLAGS = -w -v
ODIR = gen/src
CODEGEN = org.jibx.schema.codegen.CodeGen
JIBXTOOLSJAR = /home/art/Documents/PFC2/jibx/lib/jibx-tools.jar
OGCDIR = /home/art/Documents/PFC2/ogc_schemas

#java -cp ../lib/jibx-tools.jar org.jibx.schema.codegen.CodeGen -t gen/src -w starter.xsd
#java -cp /home/art/Documents/PFC2/jibx/lib/jibx-tools.jar org.jibx.schema.codegen.CodeGen -t gen/src -w schemas/kml21.xsd

all :
	echo "Warning! if you make googlekml or ogckml the generated binding.xml file will be autist"

googlekml : 	
	$(JAVA) $(CP) $(JIBXTOOLSJAR) $(CODEGEN) -t $(ODIR) $(FLAGS) schemas/kml21.xsd

ogckml :
	$(JAVA) $(CP) $(JIBXTOOLSJAR) $(CODEGEN) -t $(ODIR) $(FLAGS) schemas/ogckml22.xsd
#	$(JAVA) $(CP) $(JIBXTOOLSJAR) $(CODEGEN) -t $(ODIR) $(FLAGS) -s $(OGCDIR)/kml/2.2.0/ $(OGCDIR)/kml/2.2.0/ogckml22a.xsd

ogcgml :
	$(JAVA) $(CP) $(JIBXTOOLSJAR) $(CODEGEN) -t $(ODIR) $(FLAGS) $(OGCDIR)/gml/3.2.1/gml.xsd

bind:
	ant compile bind

jibxversion :
	$(JAVA) $(CP) $(JIBXTOOLSJAR) $(CODEGEN)

#make a jar jar binks?
jar :
	cd bin; jar cf kml_bindings.jar  com/ net/ org/ oasisnamestcciqxsdschemaxal2/
#	jar cf kml_bindings_ogc.jar 

clean :
	rm -r gen

#cd bin
#jar cf kml_bindings.jar com/

